//
//  BQShopTipView.m
//  BeeQuick
//
//  Created by student on 2017/7/9.
//  Copyright © 2017年 BecomeRich. All rights reserved.
//

#import "BQShopTipView.h"
#import <Masonry.h>

@implementation BQShopTipView

- (instancetype)init{
    
    if (self = [super init]) {
        self.backgroundColor = [UIColor groupTableViewBackgroundColor];
        [self setupUI];
    }
    return  self;
}

- (void)setupUI{
    
    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"v2_shop_empty"]];
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.offset(120);
    }];
    UILabel *tipLabel = [[UILabel alloc]init];
    tipLabel.text = @"亲,购物车空空的耶~赶紧挑好吃的吧";
    tipLabel.numberOfLines = 0;
    tipLabel.font = [UIFont systemFontOfSize:15];
    [self addSubview:tipLabel];
    [tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(imageView.mas_bottom).offset(40);
    }];
    UIButton *button = [[UIButton alloc]init];
    [button setBackgroundImage:[UIImage imageNamed:@"btn.png"]  forState:UIControlStateNormal];
    [button setTitle:@"去逛逛" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    [self addSubview:button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(tipLabel.mas_bottom).offset(40);
        make.width.offset(150);
        make.height.offset(40);
    }];
    
    
                        
}
@end
